import request from '@/utils/request'
// 获取列表
export const getenterPriseAPI = (params) => {
  return request({
    url: '/park/enterprise',
    params
  })
}
// 获取行业列表
export const getIndustryAPI = () => {
  return request({
    url: '/park/industry'
  })
}
// 上传营业执照
export const uploadBusinessLicenseAPI = (data) => {
  return request({
    url: '/upload',
    method: 'POST',
    data
  })
}
// 添加企业
export const addEnterpriseAPI = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'POST',
    data
  })
}
// 编辑企业
export const editEnterpriseAPI = (id) => {
  return request({
    url: `/park/enterprise/${id}`
  })
}
// 更新企业
export const updateEnterpriseAPI = (data) => {
  return request({
    url: '/park/enterprise',
    method: 'PUT',
    data
  })
}
// 删除企业
export const deleteEnterpriseAPI = (id) => {
  return request({
    url: `/park/enterprise/${id}`,
    method: 'DELETE'
  })
}
// 获取楼宇
export const getBuildingAPI = () => {
  return request({
    url: '/park/rent/building',
    method: 'GET'
  })
}
// 创建合同、
export const getContractAPI = (data) => {
  return request({
    url: '/park/enterprise/rent',
    method: 'post',
    data
  })
}
// 合同详情
export const getContractDetailAPI = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`
    // method: 'get'
  })
}
// 合同状态修改
export const updateContractStatusAPI = (id) => {
  return request({
    url: `/park/enterprise/rent/${id}`,
    method: 'PUT'
  })
}
// 查看信息
export const lookEnterpriseDetailAPI = (id) => {
  return request({
    url: `/park/enterprise/${id}`
  })
}
// 下载合同
export const downloadContractAPI = (id) => {
  return request({
    url: `/download/${id}`,
    method: 'post'
  })
}
